package IC.AST.nodes;

import java.util.List;
import IC.AST.*;

/**
 * a block of statements
 */
public class StmtBlock extends Statement {
	private List<Statement> stmts;	// list of the statements in the block

	/**
	 * @param stmts list of the statements in the block
	 * @param fileName TODO
	 * @param line the node line number
	 * @param column the node column number
	 */
	public StmtBlock(List<Statement> stmts, String fileName, int line, int column) {
		super(fileName, line,column);
		this.stmts = stmts;
	}

	/**
	 * @return list of the statements in the block
	 */
	public List<Statement> getStmts() {
		return this.stmts;
	}

	public <D,U> U accept(PropogatingVisitor<D,U> v, D context) throws Exception {
		return v.visit(this,context);
	}
}
